package com.zsck.zsgy.ui.main.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder
import com.zsck.zsgy.R
import com.zsck.zsgy.app.MyApplication
import com.zsck.zsgy.databinding.ItemHomeCircleBinding
import com.zsck.zsgy.ui.main.bean.HomeBean
import com.zsck.zsgy.util.Constants
import com.zsck.zsgy.util.GlideUtils

class HomeCirvcleAdapter :
    BaseQuickAdapter<HomeBean.SimpleCycleBean, BaseDataBindingHolder<ItemHomeCircleBinding>>(
        R.layout.item_home_circle
    ) {
    override fun convert(
        holder: BaseDataBindingHolder<ItemHomeCircleBinding>,
        item: HomeBean.SimpleCycleBean
    ) {

        if (holder.dataBinding != null) {
            holder.dataBinding!!.homeCircle = item
            GlideUtils.displayWithConner(
                Constants.IMG_HOST + item.contentCoverFile.getFileId(),
                holder.dataBinding!!.ivIcon,
                MyApplication.context,
                8
            )

        }
    }
}